
/**
 * A program demonstrate basic while loop operation
 * 
 * @author Amrita Mukherjee
 * @version 08/10/2012
 */
public class BasicWhileLoop
{
   public static void main(String[] args)
    {
        // declare and assign the loop variable count to 0
        int count = 0;
        
        //while count hasnt yet reached 5, print out the value of count
        while(count<=5)
        { 
            System.out.println("Count is: " + count);
            
            //now we increment count
            count = count + 1;
        }
        
        //This is the next statement after the while loop
        System.out.println("After the loop");
    }
}
/*
 * My test session:
 * Count is: 0
Count is: 1
Count is: 2
Count is: 3
Count is: 4
Count is: 5
After the loop

 */
